home *** CD-ROM | disk | FTP | other *** search
/ Clickx 115 / Clickx 115.iso / software / tools / windows / tails-i386-0.16.iso / live / filesystem.squashfs / var / lib / dpkg / info / dbus.postinst < prev    next >
Encoding:
Text File  |  2011-06-15  |  2.2 KB  |  69 lines

  1. #!/bin/sh
  2. # Copyright ┬⌐ 2003 Colin Walters <walters@debian.org>
  3. # Copyright ┬⌐ 2006 Sjoerd Simons <sjoerd@debian.org>
  4.  
  5. set -e
  6.  
  7. MESSAGEUSER=messagebus
  8. MESSAGEHOME=/var/run/dbus
  9. LAUNCHER=/usr/lib/dbus-1.0/dbus-daemon-launch-helper
  10.  
  11. if [ "$1" = configure ]; then
  12.     adduser --system \
  13.             --quiet \
  14.             --home "$MESSAGEHOME" \
  15.             --no-create-home \
  16.             --disabled-password \
  17.             --group "$MESSAGEUSER"
  18.  
  19.     if ! dpkg-statoverride --list "$LAUNCHER" >/dev/null 2>&1; then
  20.             chown root:"$MESSAGEUSER" "$LAUNCHER"
  21.             chmod 4754 "$LAUNCHER"
  22.     fi
  23. fi
  24.  
  25. # update init script symlinks for new runlevels and priorities for upgrades
  26. # from older versions
  27. if [ "$1" = configure ] && dpkg --compare-versions "$2" lt-nl 1.1.20-1; then
  28.     echo "Reinstalling init script for new runlevels and priorities ..." >&2
  29.     # remove old init script symlinks; dh_installinit adds the proper
  30.     # update-rc.d snippet later on
  31.     update-rc.d -f dbus remove >/dev/null
  32. fi
  33.  
  34. # Remove stop symlinks for runlevel 1 as killprocs already does the job for us.
  35. if [ "$1" = configure ] && dpkg --compare-versions "$2" lt-nl 1.2.24-1; then
  36.     rm -f /etc/rc1.d/K??dbus
  37. fi
  38.  
  39. if [ "$1" = configure ] && [ -n "$2" ] && [ -x "/etc/init.d/dbus" ]; then
  40.     # Do not restart dbus on upgrades, only on fresh installations.
  41.     # (dh_installinit -r creates a start action)
  42.     # But do reload it so the machine-id can be generated
  43.     if /etc/init.d/dbus status > /dev/null; then
  44.         # trigger an update notification which recommends to reboot
  45.         [ -x /usr/share/update-notifier/notify-reboot-required ] && \
  46.             /usr/share/update-notifier/notify-reboot-required || true
  47.         if [ -x "/etc/init.d/dbus" ]; then
  48.             if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
  49.                 invoke-rc.d dbus reload || true
  50.             else
  51.                 /etc/init.d/dbus reload || true
  52.             fi
  53.         fi
  54.     fi
  55. fi
  56.  
  57. # Automatically added by dh_installinit
  58. if [ -x "/etc/init.d/dbus" ]; then
  59.     update-rc.d dbus start 12 2 3 4 5 . >/dev/null
  60.     if [ -x "`which invoke-rc.d 2>/dev/null`" ]; then
  61.         invoke-rc.d dbus start || exit $?
  62.     else
  63.         /etc/init.d/dbus start || exit $?
  64.     fi
  65. fi
  66. # End automatically added section
  67.  
  68.  
  69.